import request from '@/utils/request'
// #region 线体定义
// 获取线体清单
export function getLineList(query) {
  return request({
    url: '/web/equipment',
    method: 'post',
    data: { eventId: 700, para: query }
  })
}
// 创建一条线体
export function creatLine(val) {
  return request({
    url: '/web/equipment',
    method: 'post',
    data: { eventId: 701, para: val }
  })
}
// 更新一个项目
export function updateLine(val) {
  return request({
    url: '/web/equipment',
    method: 'post',
    data: { eventId: 702, para: val }
  })
}
// 删除一个项目
export function deleteLine(val) {
  return request({
    url: '/web/equipment',
    method: 'post',
    data: { eventId: 703, para: val }
  })
}
// #endregion

// #region 工站设置
// 获取工站清单
export function getStationList(query) {
  return request({
    url: '/web/equipment',
    method: 'post',
    data: { eventId: 710, para: query }
  })
}
// 创建一个站位
export function creatStation(val) {
  return request({
    url: '/web/equipment',
    method: 'post',
    data: { eventId: 711, para: val }
  })
}
// 更新一个工站
export function updateStation(val) {
  return request({
    url: '/web/equipment',
    method: 'post',
    data: { eventId: 712, para: val }
  })
}
// 删除一个工站
export function deleteStation(val) {
  return request({
    url: '/web/equipment',
    method: 'post',
    data: { eventId: 713, para: val }
  })
}
// 获取工站清单
export function getStationListEx(query) {
  return request({
    url: '/web/equipment',
    method: 'post',
    data: { eventId: 714, para: query }
  })
}
// #endregion

// #region 工艺结果设置
// 获取工站清单
export function getProcessResultList(query) {
  return request({
    url: '/web/equipment',
    method: 'post',
    data: { eventId: 730, para: query }
  })
}
// 创建一个站位
export function creatProcessResult(val) {
  return request({
    url: '/web/equipment',
    method: 'post',
    data: { eventId: 731, para: val }
  })
}
// 更新一个工站
export function updateProcessResult(val) {
  return request({
    url: '/web/equipment',
    method: 'post',
    data: { eventId: 732, para: val }
  })
}
// 删除一个工艺结果
export function deleteProcessResult(val) {
  return request({
    url: '/web/equipment',
    method: 'post',
    data: { eventId: 733, para: val }
  })
}
// #endregion

// #region 工艺设置
// 获取工站清单
export function getProcessList(query) {
  return request({
    url: '/web/equipment',
    method: 'post',
    data: { eventId: 720, para: query }
  })
}
// #endregion

// #region 报警查询
// 获取报警记录
export function getEquipmentAlarms(query) {
  return request({
    url: '/web/equipment',
    method: 'post',
    data: { eventId: 740, para: query }
  })
}
// 获取报警统计
export function getAlarms(query) {
  return request({
    url: '/web/equipment',
    method: 'post',
    data: { eventId: 760, para: query }
  })
}
// 更新报警信息
export function creatAlarmRemark(val) {
  return request({
    url: '/web/equipment',
    method: 'post',
    data: { eventId: 741, para: val }
  })
}
// #endregion

// 获取工艺的节拍时间
export function getProcessCycle(query) {
  return request({
    url: '/web/equipment',
    method: 'post',
    data: { eventId: 750, para: query }
  })
}
// 从mes下载工艺数据
export function downloadUserProcessFromMes(query) {
  return request({
    url: '/web/rmes',
    method: 'post',
    data: { eventId: 1604, para: query }
  })
}

// 获取工站清单
export function getEquipmentAlarmDefsList(query) {
  return request({
    url: '/web/equipment',
    method: 'post',
    data: { eventId: 770, para: query }
  })
}
// 创建一个站位
export function creatEquipmentAlarmDefsList(val) {
  return request({
    url: '/web/equipment',
    method: 'post',
    data: { eventId: 771, para: val }
  })
}
// 更新一个工站
export function updateEquipmentAlarmDefsList(val) {
  return request({
    url: '/web/equipment',
    method: 'post',
    data: { eventId: 772, para: val }
  })
}
// 删除一个工艺结果
export function deleteEquipmentAlarmDefsList(val) {
  return request({
    url: '/web/equipment',
    method: 'post',
    data: { eventId: 773, para: val }
  })
}
// 导入表格数据
export function importExcel(val) {
  return request({
    url: '/web/equipment',
    method: 'post',
    data: { eventId: 774, para: val }
  })
}
